package org.tacticalTroopers.jme.common.message;

import java.util.HashMap;
import java.util.Map;

import com.jme3.network.message.Message;
import com.jme3.network.serializing.Serializable;

@Serializable()
public class GameState extends Message{

	HashMap<Integer, Element> dynamicElements = new HashMap<Integer, Element>();
	PlayerNames playerNames = null;

	

	public GameState() {
		//setReliable(true);
	}


	public HashMap<Integer, Element> getDynamicElements() {
		return dynamicElements;
	}


	public void addElement(Integer id,Element elementMessage) {
		dynamicElements.put(id,elementMessage);
	}


	public void removeElement(Integer id) {
		dynamicElements.remove(id);
	}
	
	@Override
	public String toString() {
		return "GameState{dynamicsElement:"+dynamicElements+"}";
	}
	
	public PlayerNames getPlayerNames() {
		return playerNames;
	}


	public void setPlayerNames(PlayerNames playerNames) {
		this.playerNames = playerNames;
	}


}